package com.evan.design.creational.simplefactory;

/**
 * @author :liujiapeng01
 * @date :2019-03-21 13:36
 **/
public class VideoFactory {

    public static Video getVideo(Class<? extends Video> clazz) {
        try {
            return clazz.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }

}
